package com.yunhe.java.day03;

import java.util.Scanner;
public class Maopao {
    public static void main(String[] args) {
        int [] a=new int[5];
        Scanner sc=new Scanner(System.in);
        for(int i=0;i<a.length;i++){
            a[i]=sc.nextInt();
        }
        int temp=0;
        for(int i=0; i<a.length-1 ; i++){
            for (int j= 0;j < a.length-1-i;j++){
                if (a[j]>a[j+ 1]){
                    temp = a[j];
                    a[j] = a[j+ 1];
                    a[j+ 1] = temp;
                }
            }
        }System.out.println(a[0]);
        System.out.println(a[4]);
    }
}
